/*************************************************************
 * File: PersistenceSupport.java
 * Copyright (c) 2012
 * Author: Shaobin.Software@gmail.com Shaobin_Software@163.com 
 * Date: Jan 10, 2013
 * Description: 
 ************************************************************/

package snow.core.persistence;

import java.io.Serializable;
import java.util.List;

import snow.core.persistence.query.Conditions;
import snow.core.persistence.query.Order;

/**
 * 持久化工具接口
 * 
 * @author Shaobin.Software@gmail.com Shaobin_Software@163.com
 * @version 1.0
 */
public abstract class PersistenceSupport {

	public abstract void delete(Object entity);

	public abstract <T> List<T> find(Class<T> entityClass, Conditions conditions, List<Order> orders, int start, int limit);

	public abstract <T> T find(Class<T> entityClass, Serializable id);

	public abstract Pagination findForPaging(Class<?> entityClass, Conditions conditions, List<Order> orders, int start, int limit);

	public abstract <ID extends Serializable> ID save(Object entity, Class<ID> idClass);

	public abstract void update(Object entity);

}
